<?php 
namespace App\Console;

use Illuminate\Console\Command;

class AppSo extends Command
{
	protected $signature = 'appso:get';
	public function handle()
	{

		$appsoheader=["15","12","22","7","20","6","18","10","11","8","13","21","9","17","14","19","23","5","16"];

		$appsoheader=json_decode($appsoheader);
		$limit=array_chunk($appsoheader, 5);
		$this->dohandle($limit[0]);

	}	

	private function dohandle($category)
	{
		foreach ($category as $key => $id) {
			# code...
			$appso=new AppSo\AppSo();
			$appso->handle($id);
		}
	}
} 

/**
	21 IT科技
	12 交通
	22 体育
	7  公益

	{"IT科技":"15","交通":"12","体育":"22","公益":"7","医疗":"20","商业服务":"6","商家自营":"18","富媒体":"10","工具":"11","快递邮政":"8","房地产":"13","政务民生":"21","教育":"9","旅游":"17","生活服务":"14","电商":"19","社交":"23","金融":"5","餐饮":"16"}

	let arr=[];$('.js-header-category').each(function(item){let obj={};obj[$(this).attr('ga-label')]=$(this).attr('data-category');arr.push(obj)});console.log(JSON.stringify(arr));
VM2176:1 [{"undefined":""},{"IT科技":"15"},{"交通":"12"},{"体育":"22"},{"公益":"7"},{"医疗":"20"},{"商业服务":"6"},{"商家自营":"18"},{"富媒体":"10"},{"工具":"11"},{"快递邮政":"8"},{"房地产":"13"},{"政务民生":"21"},{"教育":"9"},{"旅游":"17"},{"生活服务":"14"},{"电商":"19"},{"社交":"23"},{"金融":"5"},{"餐饮":"16"}]

["15","12","22","7","20","6","18","10","11","8","13","21","9","17","14","19","23","5","16"];


*/
